package cn.edu.sdjzu.xg23.kcsj01_backend.mapper;

import cn.edu.sdjzu.xg23.kcsj01_backend.entity.Employee;
import cn.edu.sdjzu.xg23.kcsj01_backend.entity.EmployeeAssReward;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface EmployeeAssRewardMapper {
    // 根据专利id查询所有申报人
    List<EmployeeAssReward> getApplicantsByRewardId(Long rewardId);
    // 根据专利id查询第一申报人
    Employee getFirstApplicantByRewardId(Long rewardId);
    boolean insertApplicants(@Param("list") List<EmployeeAssReward> list);

    @Delete("DELETE FROM employee_reward WHERE reward_id = #{rewardId}")
    int delete(Long id);
}
